<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>



 <h:form>

  <p:growl id="growl" showDetail="true" sticky="true" />

  <p:panel header="Add new Customer" id="customer-add">

  
   <p:panelGrid  columns="2">
   
    <p:outputLabel for="customer-name" value="Customer" />
    <p:inputText id="customer-name" required="true" value="#{customerController.customer.name}" />

    <p:outputLabel for="address-name" value="Address" />
    <p:inputText id="address-name" value="#{customerController.customer.address.address}" />

    <p:outputLabel for="address-city" value="City" />
    <p:inputText id="address-city" value="#{customerController.customer.address.city}" />

    <p:outputLabel for="address-province" value="Province" />
    <p:inputText id="address-province" value="#{customerController.customer.address.province}" />

    <p:outputLabel for="address-state" value="State" />
    <p:inputText id="address-state" value="#{customerController.customer.address.state}" />

   </p:panelGrid>

  </p:panel>
  <p:commandButton value="Save" action="#{customerController.save}" update="growl" />
 </h:form>


</h:body>
</html>